package com.yugao.fintech.antelope.mps.api.model.mq;

import com.yugao.fintech.antelope.base.model.module.mq.AbstractMQ;
import com.yugao.fintech.antelope.base.model.module.mq.BaseMqPayload;
import com.yugao.fintech.antelope.mps.api.constatnts.MsgPushMqCons;
import com.yugao.fintech.antelope.mps.api.model.rqrs.MsgPushParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 消息推送队列

 */
public class MsgPushMQ extends AbstractMQ {

    public static final String QUEUE = "msg_push.queue";
    public static final String KEY = "msg_push.key";
    public static final String EXCHANGE = MsgPushMqCons.MSG_PUSH_EXCHANGE;

    /**
     * 延时队列配置
     */
    public static final String DELAYED_QUEUE = "msg_push.delayed.queue";
    public static final String DELAYED_EXCHANGE = "msg_push.delayed.exchange";

    public MsgPushMQ(MsgPayload msgPayload) {
        super(msgPayload);
    }

    @Data
    @EqualsAndHashCode(callSuper = true)
    @AllArgsConstructor
    public static class MsgPayload extends BaseMqPayload {
        private MsgPushParam msgPushParam;
    }

    public static MsgPushMQ build(MsgPushParam msgPushParam){
        return new MsgPushMQ(new MsgPayload(msgPushParam));
    }
}
